package com.culturalCenter.dataCenter.customEntity;

import com.culturalCenter.dataCenter.entity.JwtUser;
import com.culturalCenter.dataCenter.entity.user.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

@ApiModel(value = "登录接口返回信息类")
public class CustomUser {

    @ApiModelProperty(value = "主键")
    private String id;
    @ApiModelProperty(value = "用户名")
    private String userName;
    @ApiModelProperty(value = "姓名")
    private String realName;
    @ApiModelProperty(value = "手机号码")
    private String mobile;
    @ApiModelProperty(value = "权限")
    private List<String> role;
    @ApiModelProperty(value = "头像")
    private String picture;

    public CustomUser() {
        super();
    }

    public CustomUser(JwtUser user) {
        this.id = user.getId();
        this.userName = user.getUsername();

//        this.tbAdminRoleSites = user.getTbAdminRoleSites();
//        this.tbRoles = user.getTbRoles();
        this.realName = user.getRealname();
        this.mobile = user.getMobile();
        this.picture = user.getPicture();
    }

    public CustomUser(User user) {
        this.id = user.getId();
        this.userName = user.getNickName();
        this.realName = user.getName();
        this.mobile = user.getPhone();
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public List<String> getRole() {
        return role;
    }

    public void setRole(List<String> role) {
        this.role = role;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

}
